package com.jianghu;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Process;

public class FirstPage extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.firstpage);
		
		try {
			Intent intent = getIntent();
			String close = intent.getStringExtra("close").toString();
			if (close.equals("close")) {
				int id = Process.myPid();
				Process.killProcess(id);
			}
		} catch (Exception ex) {
			Intent newintent = new Intent();
			newintent.setClass(FirstPage.this, JiangHu.class);
			FirstPage.this.startActivity(newintent);
		}

	}

	@Override
	protected void onStart() {
		super.onStart();
		Intent intent = getIntent();
		try {
			String close = intent.getStringExtra("close").toString();
			if (close.equals("close")) {
				int id = Process.myPid();
				Process.killProcess(id);
			}
		} catch (Exception ex) {

		}

	}

}
